<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ attribute type="com.github.pagehelper.PageInfo" name="page" required="true" %>

<div class="page fix">
	<div class="layui-box layui-laypage layui-laypage-default">
		<span class="row-count">共 ${page.total} 条</span>
		<a class="ps-first laypage_first"
		   href="javascript:void(0);" onclick="pageLink(1)">首页</a>
		<c:forEach items="${page.navigatepageNums}" var="item" varStatus="s">
			<c:choose>
				<c:when test="${item == page.pageNum}">
                            <span class="ps-current layui-laypage-curr">
                                <em class="layui-laypage-em"></em>
                                <em>${page.pageNum}</em>
                            </span>
				</c:when>
				<c:otherwise>
					<a class="ps-num" href="javascript:void(0);" onclick="pageLink(${item})">${item}</a>
				</c:otherwise>
			</c:choose>
		</c:forEach>
		<a class="ps-next layui-laypage-next"
		   href="javascript:void(0);" onclick="pageLink(${page.nextPage})">下一页</a>
		<a class="ps-end layui-laypage-last"
		   href="javascript:void(0);" onclick="pageLink(${page.lastPage})">末页</a>
		<span class="page-count">共 ${page.pages} 页</span>
		<select class="page-row-num">
			<option value="10" <c:if test="${page.pageSize == 10}"> selected=""</c:if> >10 条/页</option>
			<option value="20" <c:if test="${page.pageSize == 20}"> selected=""</c:if> >20 条/页</option>
			<option value="30" <c:if test="${page.pageSize == 30}"> selected=""</c:if> >30 条/页</option>
			<option value="50" <c:if test="${page.pageSize == 50}"> selected=""</c:if> >50 条/页</option>
			<option value="100" <c:if test="${page.pageSize == 100}"> selected=""</c:if> >100 条/页</option>
		</select>
	</div>
</div>